home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 7: Sunsite / Linux Cubed Series 7 - Sunsite Vol 1.iso / system / network / daemons / dns / bind-4.9 / bind-4 / usr / man / man1 / host.1 < prev   
Encoding:
Text File  |  1995-08-04  |  8.4 KB  |  199 lines

  1.  
  2.  
  3.  
  4. HOST(1)                                                   HOST(1)
  5.  
  6.  
  7. NNAAMMEE
  8.        host - look up host names using domain server
  9.  
  10. SSYYNNOOPPSSIISS
  11.        host  [-l]  [-v] [-w] [-r] [-d] [-t querytype] [-a] host [
  12.        server ]
  13.  
  14. DDEESSCCRRIIPPTTIIOONN
  15.        _H_o_s_t looks for information about Internet hosts.  It  gets
  16.        this information from a set of interconnected servers that
  17.        are spread across the country.  By default, it simply con-
  18.        verts  between host names and Internet addresses.  However
  19.        with the -t or -a options, it can be used to find  all  of
  20.        the  information about this host that is maintained by the
  21.        domain server.
  22.  
  23.        The arguments can be either host names  or  host  numbers.
  24.        The  program first attempts to interpret them as host num-
  25.        bers.  If this fails, it will treat them as host names.  A
  26.        host number consists of first decimal numbers separated by
  27.        dots, e.g. 128.6.4.194 A host name consists of names sepa-
  28.        rated  by  dots,  e.g. topaz.rutgers.edu.  Unless the name
  29.        ends in a dot, the local domain is automatically tacked on
  30.        the end.  Thus a Rutgers user can say "host topaz", and it
  31.        will actually look up "topaz.rutgers.edu".  If this fails,
  32.        the name is tried unchanged (in this case, "topaz").  This
  33.        same convention is used for mail and other network  utili-
  34.        ties.  The actual suffix to tack on the end is obtained by
  35.        looking at the results of a  "hostname"  call,  and  using
  36.        everything  starting  at  the first dot.  (See below for a
  37.        description of how to customize the host name lookup.)
  38.  
  39.        The first argument is the host name you want to  look  up.
  40.        If  this is a number, an "inverse query" is done, i.e. the
  41.        domain system looks in a separate set of databases used to
  42.        convert numbers to names.
  43.  
  44.        The second argument is optional.  It allows you to specify
  45.        a particular server to query.  If you don't  specify  this
  46.        argument,  the default server (normally the local machine)
  47.        is used.
  48.  
  49.        If a name is specified, you may see output of  three  dif-
  50.        ferent kinds.  Here is an example that shows all of them:
  51.           % host sun4
  52.           sun4.rutgers.edu is a nickname for ATHOS.RUTGERS.EDU
  53.           ATHOS.RUTGERS.EDU has address 128.6.5.46
  54.           ATHOS.RUTGERS.EDU has address 128.6.4.4
  55.           ATHOS.RUTGERS.EDU mail is handled by ARAMIS.RUTGERS.EDU
  56.        The user has typed the command  "host  sun4".   The  first
  57.        line  indicates  that the name "sun4.rutgers.edu" is actu-
  58.        ally   a   nickname.    The   official   host   name    is
  59.        "ATHOS.RUTGERS.EDU'.  The next two lines show the address.
  60.        If a system has more than  one  network  interface,  there
  61.  
  62.  
  63.  
  64.                                                                 1
  65.  
  66.  
  67.  
  68.  
  69.  
  70. HOST(1)                                                   HOST(1)
  71.  
  72.  
  73.        will  be a separate address for each.  The last line indi-
  74.        cates that ATHOS.RUTGERS.EDU  does  not  receive  its  own
  75.        mail.   Mail for it is taken by ARAMIS.RUTGERS.EDU.  There
  76.        may be more than one such line, since  some  systems  have
  77.        more than one other system that will handle mail for them.
  78.        Technically, every system that can receive  mail  is  sup-
  79.        posed  to  have  an  entry  of  this  kind.  If the system
  80.        receives its own mail, there should be an entry  the  men-
  81.        tions  the system itself, for example "XXX mail is handled
  82.        by XXX".  However many systems that receive their own mail
  83.        do  not  bother  to  mention that fact.  If a system has a
  84.        "mail is handled by" entry, but no address, this indicates
  85.        that  it  is not really part of the Internet, but a system
  86.        that is on the network will forward mail to  it.   Systems
  87.        on  Usenet,  Bitnet,  and  a number of other networks have
  88.        entries of this kind.
  89.  
  90.        There are a number of options that can be used before  the
  91.        host  name.   Most of these options are meaningful only to
  92.        the staff who have to maintain the domain database.
  93.  
  94.        The option -w causes host to wait forever for a  response.
  95.        Normally it will time out after around a minute.
  96.  
  97.        The option -v causes printout to be in a "verbose" format.
  98.        This is the official domain master file format,  which  is
  99.        documented  in  the  man  page  for "named".  Without this
  100.        option, output still follows this format in general terms,
  101.        but  some  attempt is made to make it more intelligible to
  102.        normal users.  Without -v, "a", "mx", and "cname"  records
  103.        are  written  out  as "has address", "mail is handled by",
  104.        and "is a nickname for", and TTL and class fields are  not
  105.        shown.
  106.  
  107.        The  option  -r  causes  recursion to be turned off in the
  108.        request.  This means that the name server will return only
  109.        data  it  has  in its own database.  It will not ask other
  110.        servers for more information.
  111.  
  112.        The option -d turns on  debugging.   Network  transactions
  113.        are shown in detail.
  114.  
  115.        The  option  -t allows you to specify a particular type of
  116.        information to be looked up.  The arguments are defined in
  117.        the  man  page for "named".  Currently supported types are
  118.        a, ns, md, mf, cname, soa, mb, mg,  mr,  null,  wks,  ptr,
  119.        hinfo,  minfo,  mx, uinfo, uid, gid, unspec, and the wild-
  120.        card, which may be written as either "any" or "*".   Types
  121.        must  be given in lower case.  Note that the default is to
  122.        look first for "a", and then "mx", except that if the ver-
  123.        bose option is turned on, the default is only "a".
  124.  
  125.        The option -a (for "all") is equivalent to "-v -t any".
  126.  
  127.  
  128.  
  129.  
  130.                                                                 2
  131.  
  132.  
  133.  
  134.  
  135.  
  136. HOST(1)                                                   HOST(1)
  137.  
  138.  
  139.        The option -l causes a listing of a complete domain.  E.g.
  140.           host -l rutgers.edu
  141.        will give a  listing  of  all  hosts  in  the  rutgers.edu
  142.        domain.   The -t option is used to filter what information
  143.        is presented, as you would expect.  The default is address
  144.        information,  which  also include PTR and NS records.  The
  145.        command
  146.           host -l -v -t any rutgers.edu
  147.        will give a complete download of the zone  data  for  rut-
  148.        gers.edu,  in  the  official master file format.  (However
  149.        the SOA record  is  listed  twice,  for  arcane  reasons.)
  150.        NOTE:  -l is implemented by doing a complete zone transfer
  151.        and then filtering out the information the you have  asked
  152.        for.  This command should be used only if it is absolutely
  153.        necessary.
  154.  
  155. CCUUSSTTOOMMIIZZIINNGG HHOOSSTT NNAAMMEE LLOOOOKKUUPP
  156.        In general, if the name supplied by the user does not have
  157.        any  dots  in it, a default domain is appended to the end.
  158.        This domain can be defined  in  /etc/resolv.conf,  but  is
  159.        normally  derived  by  taking the local hostname after its
  160.        first dot.  The user can override this, and specify a dif-
  161.        ferent  default  domain,  using  the  environment variable
  162.        _L_O_C_A_L_D_O_M_A_I_N.  In addition, the user  can  supply  his  own
  163.        abbreviations  for  host  names.  They should be in a file
  164.        consisting of one line per abbreviation.  Each  line  con-
  165.        tains  an  abbreviation,  a  space, and then the full host
  166.        name.  This file must be  pointed  to  by  an  environment
  167.        variable _H_O_S_T_A_L_I_A_S_E_S, which is the name of the file.
  168.  
  169. SSeeee AAllssoo
  170.        named (8)
  171.  
  172. BBUUGGSS
  173.        Unexpected effects can happen when you type a name that is
  174.        not part of the local domain.  Please always keep in  mind
  175.        the fact that the local domain name is tacked onto the end
  176.        of every name, unless it ends in  a  dot.   Only  if  this
  177.        fails is the name used unchanged.
  178.  
  179.        The  -l option only tries the first name server listed for
  180.        the domain that you have requested.   If  this  server  is
  181.        dead,  you  may need to specify a server manually. E.g. to
  182.        get a listing of  foo.edu,  you  could  try  "host  -t  ns
  183.        foo.edu"  to  get  a  list  of  all  the  name servers for
  184.        foo.edu, and then try "host -l foo.edu xxx" for all xxx on
  185.        the list of name servers, until you find one that works.
  186.  
  187.  
  188.  
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195.  
  196.                                                                 3
  197.  
  198.  
  199.